// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    text: string = null;

    all: cc.Node = null;
    allScript: cc.Component = null;

    
    onLoad () {
        this.all = cc.find('Canvas/气泡框5');
        this.allScript = this.all.getComponent('CPRFive');
        this.text = this.node.getComponent(cc.Label).string;
        //cc.log(this.text);

        if(this.text == '4'){
            this.allScript.index++;
            cc.log(this.allScript.index);
        }
    }


    start () {

    }

    // update (dt) {}
}
